import React from 'react'
import { Link } from "react-router-dom"

import CompileRouter from "../../utils/compileRouter"
function Discover(props) {

    let { routes } = props
    // console.log(routes)
    let links = routes.map(route => {
        return (
            <li key={route.path}>
                <Link to={route.path}>{route.path}</Link>
            </li>
        )
    })
    return (
        <fieldset>
            <legend>发现</legend>
            <h1>我发现,不能说多喝热水</h1>
            <ul>
                {links}
            </ul>
            <CompileRouter routes={routes} />
        </fieldset>
    )
}
Discover.meta = {
    title: "发现",
    icon: ""
}
export default Discover